# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=c-rbtree
pkgver=3.1.0
pkgrel=1
pkgdesc="Intrusive Red-Black Tree Collection"
url="https://github.com/c-util/c-rbtree"
arch="all"
license="Apache-2.0 OR LGPL-2.1-or-later"
makedepends="
	c-stdaux-dev~=1
	meson
	"
subpackages="$pkgname-dev"
source="https://github.com/c-util/c-rbtree/archive/v$pkgver/c-rbtree-$pkgver.tar.gz"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
b1a0211dcfe667d88c1f384d1d66fdfc4fe37b0f95a74422cd01ab15212fde4b208bdb7259ada65cbc4362a59383309510756e1f20cdb817938e74a721915e04  c-rbtree-3.1.0.tar.gz
"
